package com.xdb.sqlparser.ast.statement;

import java.util.ArrayList;
import java.util.List;

import com.xdb.sqlparser.ast.SQLHint;
import com.xdb.sqlparser.ast.AbstractSQLObjectImpl;
/**
 * 抽象的表抽象实现
 * @author woate
 *
 */
public abstract class AbstractSQLTableSourceImpl extends AbstractSQLObjectImpl implements SQLTableSource {
	/**
	 * 别名
	 */
	protected String alias;

	protected List<SQLHint> hints;

	public AbstractSQLTableSourceImpl() {

	}

	public AbstractSQLTableSourceImpl(String alias) {

		this.alias = alias;
	}
	/**
	 * 别名
	 */
	public String getAlias() {
		return this.alias;
	}
	/**
	 * 别名
	 */
	public void setAlias(String alias) {
		this.alias = alias;
	}

	public int getHintsSize() {
		if (hints == null) {
			return 0;
		}

		return hints.size();
	}

	public List<SQLHint> getHints() {
		if (hints == null) {
			hints = new ArrayList<SQLHint>(2);
		}
		return hints;
	}

	public void setHints(List<SQLHint> hints) {
		this.hints = hints;
	}
}
